import { _decorator, Component, Node, NodeEventType } from 'cc';
import { UIManager } from './UIManager';
import { LanauageManager } from './LanauageManager';
const { ccclass, property } = _decorator;

@ccclass('closeBtn')
export class closeBtn extends Component {
    start() {
        this.node.on(NodeEventType.TOUCH_END, this.closeClick, this);
    }

    update(deltaTime: number) {
        
    }

    closeClick(){
        LanauageManager.playSound();
        if (this.node && this.node.parent){
            //UIManager.close(this.node.parent);
            this.node.parent.active = false;
        }
    }
}

